/* ============================================
   REGISTER PAGE STYLES - دبیرستان پلیس
   ============================================ */

/* ============================================
   FONTS - LOCAL
   ============================================ */
@font-face {
    font-family: 'Vazir';
    src: url('/public/assets/fonts/Vazir.woff2') format('woff2'),
         url('/public/assets/fonts/Vazir.woff') format('woff'),
         url('/public/assets/fonts/Vazir.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   CSS VARIABLES & RESET
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #f59e0b;
    --secondary-dark: #d97706;
    --accent: #10b981;
    --danger: #ef4444;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
}

body {
    font-family: 'Vazir', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #eff6ff 0%, #fef3c7 50%, #fce7f3 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--dark);
}

.register-container {
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    width: 100%;
    max-width: 650px;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.register-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.register-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.register-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.register-header i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.register-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.register-header p {
    opacity: 0.9;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.register-body {
    padding: 2.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    transition: color 0.3s;
    text-decoration: none;
}

.back-link:hover { color: var(--primary); }

/* ============================================
   PROGRESS STEPS - بهبود یافته
   ============================================ */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 15%;
    right: 15%;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
    transform: translateY(-50%);
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #64748b;
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
}

.progress-step.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px var(--primary-light);
    transform: scale(1.1);
}

.progress-step.completed {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 0 4px #d1fae5;
}

/* ============================================
   FORM STEPS
   ============================================ */
.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   FORM GROUPS
   ============================================ */
.form-group { margin-bottom: 1.5rem; }

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-group label .required { color: var(--danger); }

.input-wrapper { position: relative; }

.input-wrapper i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    transition: color 0.3s;
    z-index: 1;
    pointer-events: none;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 2.8rem 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: #f8fafc;
}

.form-group textarea { 
    padding-right: 1rem; 
    resize: vertical; 
    min-height: 100px; 
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-group input.error,
.form-group select.error {
    border-color: var(--danger);
    background: #fef2f2;
}

.error-text {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: 0.375rem;
    display: none;
}

.error-text.show { display: block; }

/* ============================================
   BUTTONS
   ============================================ */
.button-group { 
    display: flex; 
    gap: 1rem; 
    margin-top: 2rem; 
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover { 
    background: #e2e8f0; 
}

/* ============================================
   REVIEW BOX
   ============================================ */
.review-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-right: 4px solid var(--primary);
}

.review-box h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.review-item:last-child { border-bottom: none; }

.review-label { 
    color: var(--gray); 
    font-weight: 600; 
}

.review-value { 
    color: var(--dark); 
    font-weight: 700;
    text-align: left;
    direction: ltr;
}

/* ============================================
   INFO ALERT
   ============================================ */
.info-alert {
    background: #fef3c7;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-right: 4px solid var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #92400e;
}

/* ============================================
   ALERT MESSAGES
   ============================================ */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-right: 3px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-right: 3px solid #ef4444;
}

.alert-info {
    background: #e0f2fe;
    color: #075985;
    border-right: 3px solid #0ea5e9;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   OVERLAYS
   ============================================ */
.success-overlay,
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.success-overlay.show,
.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.success-card,
.loading-card {
    background: var(--white);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
    color: var(--accent);
}

.success-card h3 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.success-card p {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.loading-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.tracking-code {
    background: #f0f9ff;
    padding: 0.75rem;
    border-radius: 12px;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    direction: ltr;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    .register-header { padding: 1.5rem; }
    .register-header h1 { font-size: 1.25rem; }
    .register-header i { font-size: 2.5rem; }
    .register-body { padding: 1.5rem; }
    .button-group { flex-direction: column; }
    .btn { width: 100%; }
    .progress-steps { gap: 1rem; }
    .progress-steps::before { left: 10%; right: 10%; }
    .progress-step { width: 35px; height: 35px; font-size: 0.9rem; }
    .review-item { flex-direction: column; align-items: flex-start; }
    .review-value { text-align: right; }
}

@media (max-width: 480px) {
    body { padding: 0.5rem; }
    .register-container { border-radius: 16px; }
    .success-card, .loading-card { padding: 1.5rem; }
    .success-icon { width: 60px; height: 60px; font-size: 2rem; }
}